package com.tricode.ile.training.task.sl275.lab3;

public class MyPoint {
    public int x;
    public int y;

    public String toString() {
        return ("[" + x + "," + y + "]");
    }

    public static void main(String[] args) {
        MyPoint start = new MyPoint();
        MyPoint end = new MyPoint();

        start.x = 10;
        start.y = 10;

        end.x = 20;
        end.y = 30;

        System.out.println("The start point is: " + start);
        System.out.println("The end point is: " + end);

        MyPoint stray = new MyPoint();
        stray = end;

        System.out.println("stray value is: "+stray);
        System.out.println("end value is: "+end);

        stray.x = 47;
        stray.y = 50;
        System.out.println("stray: " + stray);
        System.out.println("start: "+start);
        System.out.println("end: "+end);
    }
}
